﻿using System.Collections.Generic;

namespace dk.Helper.Base.Core
{
    public class Ally : IAlly
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Ally"/> class.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="name">The name.</param>
        /// <param name="tag">The tag.</param>
        /// <param name="playersCount">The players count.</param>
        /// <param name="villagesCount">The villages count.</param>
        /// <param name="points">The points.</param>
        /// <param name="allPoints">All points.</param>
        /// <param name="rank">The rank.</param>
        /// <param name="players">The players.</param>
        public Ally(int id, string name, string tag, int playersCount, int villagesCount, int points, int allPoints,
                    int rank, IList<IPlayer> players)
        {
            ID = id;
            Name = name;
            Tag = tag;
            PlayersCount = playersCount;
            VillagesCount = villagesCount;
            Points = points;
            AllPoints = allPoints;
            Rank = rank;
            Players = players ?? new List<IPlayer>();
        }

        #region IAlly Members

        /// <summary>
        /// Gets the ID.
        /// </summary>
        public int ID { get; private set; }

        /// <summary>
        /// Gets the name.
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// Gets the tag.
        /// </summary>
        public string Tag { get; private set; }

        /// <summary>
        /// Gets the players count.
        /// </summary>
        public int PlayersCount { get; private set; }

        /// <summary>
        /// Gets the villages count.
        /// </summary>
        public int VillagesCount { get; private set; }

        /// <summary>
        /// Gets the points.
        /// </summary>
        public int Points { get; private set; }

        /// <summary>
        /// Gets all points.
        /// </summary>
        public int AllPoints { get; private set; }

        /// <summary>
        /// Gets the rank.
        /// </summary>
        public int Rank { get; private set; }

        /// <summary>
        /// Gets the players.
        /// </summary>
        public IList<IPlayer> Players { get; private set; }

        #endregion
    }
}